from med.business import (
    get_interaction,
    get_messages,
    get_permissions,
)


def get_entry_view(entry_id):
    if entry_id and entry_id.isdigit():
        return {
            "id": int(entry_id),
            "interaction": get_interaction(),
            "messages": get_messages(),
            "permissions": get_permissions(),
        }
    else:
        return {}
